package org.yxing.palpalgps.activity;

import org.yxing.palpalgps.AbstractTabActivity;
import org.yxing.palpalgps.R;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;

public class MyListTabActivity extends AbstractTabActivity{
    
    private static final String TAG = "MyListTabActivity";
    
    /**
     * integer id
     */
    private int iid;
    
    /**
     * school id
     */
    private int sid;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitle(getString(R.string.app_name));
        
        Intent intent = getIntent();
        iid = intent.getIntExtra("iid", 0);
        sid = intent.getIntExtra("sid", 0);
        
        Bundle bundle = new Bundle();
        bundle.putInt("iid", iid);
        bundle.putInt("sid", sid);
        
        TabHost tabHost = getTabHost();
        
        Intent nearestIntent = new Intent(this, NearestUsersActivity.class);
        nearestIntent.putExtras(bundle);
        
        tabHost.addTab(tabHost.newTabSpec("nearest")
                .setIndicator("Nearest", getResources().getDrawable(R.drawable.ic_tab_whosnear))
                .setContent(nearestIntent));
        
        Intent newestIntent = new Intent(this, NewRegisterListActivity.class);
        newestIntent.putExtras(bundle);
        
        tabHost.addTab(tabHost.newTabSpec("newest")
                .setIndicator("Newest", getResources().getDrawable(R.drawable.ic_tab_list))
                .setContent(newestIntent));
        
    }
}
